 <template>
  <div class="about">
    <div class="goods_list">

      <div class="goods_item" v-for="item in gwcList" :key="item.id">
        <img :src="item.pic" alt="" />
        <p>{{ item.name }}</p>
        <p>{{ item.minPrice }}</p>
        <p>数量{{ item.num }}</p>
        <p>是否购买{{ item.isbuy }}</p>

        <button @click="add(item)">加入购物车</button>
        </div>


    </div>
  </div>
</template>
<script>
import {mapState} from "vuex"
export default {
  computed:{
    ...mapState(['gwcList'])
  }
};
</script>

<style scoped>
.goods_list {
  display: flex;
  flex-wrap: wrap;
  text-align: center;
}
.goods_item {
  width: 30vw;
}
.goods_item > img {
  width: 270px;
}
</style>








